package com.javaweb.service.impl;

import com.javaweb.dao.TagDao;
import com.javaweb.model.Tag;
import com.javaweb.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl implements TagService {

    @Autowired
    private TagDao tagDao;

    @Override
    public List<Tag> list() {
        return tagDao.list();
    }

    @Override
    public int add(Tag tag) {
        return tagDao.insert(tag);
    }

    @Override
    public int delete(Integer tagId) {
        return tagDao.delete(tagId);
    }
}
